<?php
/**
 * Created by PhpStorm.
 * User: yiyu
 * Email: smalleasyu@gmail.com
 * Date: 2020-01-21 20:03:53
 * Desc:
 */

namespace app\base\service;


class BaseService
{
    private static $_instance;

    public static function instance()
    {
        $key = md5(static::class);
        if (!isset(self::$_instance[$key])) {
            return self::$_instance[$key] = new static();
        }
        return self::$_instance[$key];
    }
}
